/* 全局样式 */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9f9f9;
}

/* 导航栏样式 */
.nav {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background-color: #2c3e50;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav img {
    height: 40px;
    margin-right: 10px;
}

.nav span {
    font-size: 1.2em;
    font-weight: bold;
}

.nav .space {
    flex: 1;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
    margin: 0 5px;
}

.nav a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* 搜索框和按钮样式 */
.search-container {
    display: flex;
    margin-left: 15px;
    margin-right: 10px;
}

.nav input[type="text"] {
    padding: 8px 12px;
    border: none;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 14px;
    width: 200px;
    transition: width 0.3s;
}

.nav input[type="text"]:focus {
    width: 250px;
}

.nav button {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    font-size: 14px;
}

.nav button:hover {
    background-color: #2980b9;
}

.nav button:active {
    transform: scale(0.98);
}

/* 容器布局 */
.container {
    display: flex;
    margin: 20px;
}

.container-left {
    width: 250px;
    margin-right: 20px;
}

.container-right {
    flex: 1;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 20px;
    text-align: center;
}

.card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.card h3 {
    margin: 0;
    color: #333;
}

.card a {
    display: inline-block;
    margin-top: 10px;
    color: #3498db;
    text-decoration: none;
}

.card a:hover {
    text-decoration: underline;
}

.counter {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.counter span {
    display: block;
    font-size: 1.1em;
}

.counter span:first-child {
    color: #777;
    font-size: 0.9em;
}

/* 博客列表样式 */
.blog {
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.blog:hover {
    transform: translateY(-3px);
}

.blog .title {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.blog .date {
    color: #777;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.blog .desc {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.blog .detail {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.blog .detail:hover {
    text-decoration: underline;
}

/* 分页样式 */
#pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

#pagination button {
    padding: 8px 12px;
    margin: 0 3px;
    border: none;
    background-color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#pagination button:hover {
    background-color: #f0f0f0;
}

#pagination button:disabled {
    background-color: #e0e0e0;
    cursor: not-allowed;
}

/* 无结果提示 */
.no-result {
    text-align: center;
    padding: 50px;
    color: #777;
    font-size: 1.2em;
}

/* 搜索按钮点击效果 */
.nav button.clicked {
    animation: clickEffect 0.3s ease;
}

@keyframes clickEffect {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}